package cn.com.code.design;

import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author zhengpei
 * @date 2021/10/23
 */
public class AuthService {

  private static Map<String, Date> authMap = new ConcurrentHashMap<String, Date>();

  public static Date queryAuthInfo(String userId, String orderId) {
    return authMap.get(userId.concat(orderId));
  }

  public static void auth(String userId, String orderId){
    authMap.put(userId.concat(orderId), new Date());
  }

}
